package orz.mikeneck.server.locrec.model;

import java.util.List;

import javax.jdo.PersistenceManager;
import javax.jdo.Query;

import orz.mikeneck.server.locrec.persistent.GpsRecord;

public interface LocRecGpsModel {

	public static final String DEFAULT_FILTER = "loginId==pLoginId";

	public static final String PARAM_LOGIN_ID = "String pLoginId";

	public static final String PARAM_SEPARATER = ",";

	public static final String PARAM_END_DATE = "java.util.Date pToDate";

	public static final String PARAM_START_DATE = "java.util.Date pFromDate";

	public static final String FILTER_END_DATE = "createdAt > pToDate";

	public static final String FILTER_START_DATE = "createdAt < pFromDate";

	public static final String FILTER_SEPT_AND = " && ";

	public static final String FILTER_SEPT_OR = " || ";

	public static final String OPEN_PARENTHESES = "(";

	public static final String CLOSE_PARENTHESES = ")";

	/**
	 * @hide
	 * @param lat
	 * @return
	 * @throws NumberFormatException
	 */
	@Deprecated
	public LocRecGpsModel latitudeIs(double lat) throws NumberFormatException;

	/**
	 * @hide
	 * @param lon
	 * @return
	 * @throws NumberFormatException
	 */
	@Deprecated
	public LocRecGpsModel longitudeIs(double lon) throws NumberFormatException;

	public LocRecGpsModel loginIdIs(String login);

	@Deprecated
	public LocRecGpsModel persistentManagerIs(PersistenceManager manager);

	public void makePersistence();

	public LocRecGpsModel userLocationIs(double lat, double lon) throws NumberFormatException;

	public void deletePersistence();

	@Deprecated
	public Query createQuery();

	@Deprecated
	public List<GpsRecord> findRecordByLoginId();

	public LocRecGpsModel addFilter(String filter);

	public LocRecGpsModel and();

	public LocRecGpsModel or();

	public LocRecGpsModel addParameter(String param);

	public List<GpsRecord> findRecordsWithParams(Object... params);

	public LocRecGpsModel recordsFrom(long from);

	public LocRecGpsModel recordsTo(long to);
}
